package com.woniu.aimd.utils;

import com.woniu.aimd.service.impl.NodeServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class NodeProcessingScheduler {
    @Autowired
    private NodeServiceImpl nodeService;
    @Scheduled(fixedRate = 100000)
    public void processNodesTask() {
        //定时新增节点
        nodeService.processNewNodesFromRedis();
        //定时修改节点
        nodeService.processUpdateNodesFromRedis();
        //定时删除节点
        nodeService.processDeleteNodesFromRedis();
    }
}
